home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / NDK / NDK_1.3 / Read-Me1.3 / Autodocs1.3 / printer.doc < prev    next >
Encoding:
Text File  |  1988-07-26  |  37.5 KB  |  1,002 lines

  1.  
  2. TABLE OF CONTENTS
  3.  
  4. printer.device/DumpRPort
  5. printer.device/Flush
  6. printer.device/Invalid
  7. printer.device/PrtCommand
  8. printer.device/PWrite
  9. printer.device/Query
  10. printer.device/RawWrite
  11. printer.device/Reset
  12. printer.device/Start
  13. printer.device/Stop
  14. printer.device/Write
  15.  
  16.  
  17. printer.device/DumpRPort                           printer.device/DumpRPort
  18.  
  19.    NAME
  20.     DumpRPort - dump the specified RastPort to a graphics printer.
  21.                                  
  22.    FUNCTION                             
  23.     Print a rendition of the supplied RastPort, using the supplied
  24.     ColorMap, position and scaling information, as specified in
  25.     the printer preferences.
  26.                                  
  27.    IO REQUEST
  28.     io_Message    mn_ReplyPort set if quick I/O is not possible.
  29.     io_Command    PRD_DUMPRPORT.
  30.     io_Flags    IOB_QUICK set if quick I/O is possible.
  31.     io_RastPort    ptr to a RastPort.
  32.     io_ColorMap    ptr to a ColorMap.
  33.     io_Modes    the 'modes' flag from a ViewPort structure,
  34.             (the upper word is reserved and should be zero).
  35.     io_SrcX        x offset into the RastPort to start printing from.
  36.     io_SrcY        y offset into the RastPort to start printing from.
  37.     io_SrcWidth    width of the RastPort to print (from io_SrcX).
  38.     io_SrcHeight    height of the RastPort to print (from io_SrcY).
  39.     io_DestCols    width of the printout in printer pixels.
  40.     io_DestRows    height of the printout in printer pixels.
  41.     io_Special    flag bits
  42.             (some of which pertain to DestCols and DestRows).
  43.             -if SPECIAL_MIL is set, then the associated
  44.              parameter is specified in thousandths of
  45.              an inch on the printer.  ie. if DestCols = 8000,
  46.              DestRows = 10500 and SPECIAL_MILROWS and
  47.              SPECIAL_MILCOLS is set then the printout would be
  48.              8.000 x 10.500 inches.
  49.             -if SPECIAL_FULL is set, then the specific dimension
  50.              is set to the maximum possible as determined
  51.              by the printer limits or the configuration
  52.              limits; whichever is less.
  53.             -if SPECIAL_FRAC is set, the parameter is
  54.              taken to be a longword binary fraction
  55.              of the maximum for that dimension.
  56.             -if all bits for a dimension are clear,
  57.              (ie. SPECIAL MIL/FULL/FRAC and ASPECT are NOT set)
  58.              then the parameter is specified in printer pixels.
  59.             -if SPECIAL_CENTER is set then the image will be
  60.              put between the left and right edge of the paper.
  61.             -if SPECIAL_ASPECT is set, one of the dimensions
  62.              may be reduced/expanded to preserve the aspect
  63.              ratio of the print.
  64.             -SPECIAL_DENSITY(1-7) this allows for a maximum of 7
  65.              different print densities.  DENSITY1 is the lowest
  66.              density and the default.
  67.             -SPECIAL_NOFORMFEED - this allows for the mixing of
  68.              text and graphics or multiple graphic dumps on page
  69.              oriented printers (usually laser jet printers).
  70.              When this flag is set the page will not be ejected
  71.              after a graphic dump.  If you perform another
  72.              graphic dump without this flag set OR close the
  73.              printer after printing text after a graphic dump,
  74.              the page will be ejected.
  75.             -if SPECIAL_TRUSTME is set then the printer specific
  76.              driver is instructed to not issue a reset command
  77.              before and after the dump.  If this flag is NOT
  78.              checked by the printer specific driver then setting
  79.              this flag has no effect.  Since we now recommend
  80.              that printer driver writers no longer issue a reset
  81.              command it is probably a safe idea to always set
  82.              this flag when calling for a dump.
  83.             -if SPECIAL_NOPRINT is set then the following is done:
  84.              Compute print size, set 'io_DestCols' and
  85.              'io_DestRows' in the calling program's 'IODRPReq'
  86.              structure and exit, DON'T PRINT.  This allows the
  87.              calling program to see what the final print size
  88.              would be in printer pixels.  Note that it modifies
  89.              the 'io_DestCols' and 'io_DestRows' fields of your
  90.              'IODRPReq' structure.  It also sets the print
  91.              density and updates the 'MaxXDots', 'MaxYDots',
  92.              'XDotsInch', and 'YDotsInch' fields of the
  93.              'PrinterExtendedData' structure.
  94.  
  95.     There following rules for the interpretation of io_DestRows and
  96.     io_DestCols that may produce unexpected results when they are
  97.     not greater than zero and io_Special is zero.  They have been
  98.     retained for compatability.  The user will not trigger these
  99.     other rules with well formed usage of io_Special.
  100.  
  101.     When io_Special is equal to 0, the following rules
  102.     (from the V1.1 printer.device, and retained for compatibility
  103.     reasons) take effect.  Remember, these special rules are
  104.     for io_DestRows and io_DestCols and only take effect
  105.     if io_Special is 0).
  106.  
  107.     a) DestCols>0 & DestRows>0 - use as absolute values.
  108.        ie. DestCols=320 & DestRows=200 means that the picture
  109.        will appear on the printer as 320x200 dots.
  110.     b) DestCols=0 & DestRows>0 - use the printers maximum number
  111.        of columns and print DestRows lines. ie. if DestCols=0
  112.        and DestRows=200 than the picture will appear on the
  113.        printer as wide as it can be and 200 dots high.
  114.     c) DestCols=0 & DestRows=0 - same as above except the driver
  115.        determines the proper number of lines to print based on
  116.        the aspect ratio of the printer. ie. This results in the
  117.        largest picture possible that is not distorted or inverted.
  118.        Note: As of this writing, this is the call made by such
  119.        program as DeluxePaint, GraphicCraft, and AegisImages.
  120.     d) DestCols>0 &DestRows=0 - use the specified width and the
  121.        driver determines the proper number of lines to print based
  122.        on the aspect ratio of the printer. ie. if you desire a
  123.        picture that is 500 pixels wide and aspect ratio correct,
  124.        use DestCols=500 and DestRows=0.
  125.     e) DestCols<0 or DestRows>0 - the final picture is either a
  126.        reduction or expansion based on the fraction
  127.        |DestCols| / DestRows in the proper aspect ratio.
  128.        Some examples:
  129.        1) if DestCols=-2 & DestRows=1 then the printed picture will
  130.           be 2x the AMIGA picture and in the proper aspect ratio.
  131.           (2x is derived from |-2| / 1 which gives 2.0)
  132.        2) if DestCols=-1 & DestRows=2 then the printed picture will
  133.           will be 1/2x the AMIGA picture in the proper aspect ratio.
  134.           (1/2x is derived from |-1| / 2 which gives 0.5)
  135.  
  136.    NOTES
  137.     The printer selected in preferences must have graphics
  138.     capability to use this command.  The error 'PDERR_NOTGRAPHICS'
  139.      is returned if the printer can not print graphics.
  140.  
  141.     Color printers may not be able to print black and white or
  142.     greyscale pictures -- specifically, the Okimate 20 cannot print
  143.     these with a color ribbon: you must use a black ribbon instead.
  144.     If the printer has an input buffer option, use it.
  145.     If the printer can be uni or bi directional, select
  146.     uni-directional; this produces a much cleaner picture.
  147.     Most printer drivers will attempt to set unidirectional
  148.     printing if it is possible under software control.
  149.  
  150.     Please note that the width and height of the printable area on
  151.     the printer is in terms of pixels and bounded by the folllowing:
  152.      a) WIDTH = (RIGHT_MARGIN - LEFT_MARGIN + 1) / CHARACTERS_PER_INCH
  153.      b) HEIGHT = LENGTH / LINES_PER_INCH
  154.        Margins are set by preferences.
  155.  
  156.     For BGR printer support, the YMC values in the printer
  157.     specific render.c functions equate to BGR respectively, ie.
  158.     yellow is blue, magenta is green, and cyan is red.
  159.                                  
  160.  Data Structures
  161.  ---------------
  162.  
  163.     The printer specific and non-specific data structures can be read
  164.     ONCE you have opended the printer device.  Here is a code fragment
  165.     to illustrate how to do just that.
  166.  
  167.     #include <exec/types.h>
  168.     #include <devices/printer.h>
  169.     #include <devices/prtbase.h>
  170.     #include <devices/prtgfx.h>
  171.  
  172.     struct IODRPReq PReq;
  173.     struct PrinterData *PD;
  174.     struct PrinterExtendedData *PED;
  175.  
  176.    open the printer device / if it opended...
  177.    if (OpenDevice("printer.device", 0, &PReq, 0) == NULL) {
  178.        get pointer to printer data
  179.        PD = (struct PrinterData *)PReq.io_Device;
  180.        get pointer to printer extended data
  181.        PED = &PD->pd_SegmentData->ps_PED;
  182.        let's see what's there
  183.        printf("PrinterName = '%s', Version=%u, Revision=%u\n",
  184.            PED->ped_PrinterName, PD->pd_SegmentData->ps_Version,
  185.            PD->pd_SegmentData->ps_Revision,);
  186.        printf("PrinterClass=%u, ColorClass=%u\n",
  187.            PED->ped_PrinterClass, PED->ped_ColorClass);
  188.        printf("MaxColumns=%u, NumCharSets=%u, NumRows=%u\n",
  189.            PED->ped_MaxColumns, PED->ped_NumCharSets, PED->ped_NumRows);
  190.        printf("MaxXDots=%lu, MaxYDots=%lu, XDotsInch=%u, YDotsInch=%u\n",
  191.            PED->ped_MaxXDots, PED->ped_MaxYDots,
  192.            PED->ped_XDotsInch, PED->ped_YDotsInch);
  193.        CloseDevice(&PReq);
  194.    }
  195.  
  196.  Preferences
  197.  -----------
  198.  
  199.     If you want the user to be able to access the printer preferences items
  200.  without having to run preferences (like DPAINT II's printer requestor),
  201.  here is what you do.  You can look at the printer's copy of preferences
  202.  by referring to 'PD->pd_Preferences' (the printer device MUST already be
  203.  opened at this point).  After you have this you could put up a requestor
  204.  and allow the user to change whatever parameters they wanted.
  205.  BEAR IN MIND THAT YOU ARE RESPONSIBLE FOR RANGE CHECKING THESE SELECTIONS!
  206.  Listed below are the printer preferences items and their valid values.
  207.  
  208.  PrintPitch         - PICA, ELITE, FINE.
  209.  PrintQuality       - DRAFT, LETTER.
  210.  PrintSpacing       - SIX_LPI, EIGHT_LPI.
  211.  PrintLeftMargin    - 1 to PrintRightMargin.
  212.  PrintRightMargin   - PrintLeftMargin to 999.
  213.  PaperLength        - 1 to 999.
  214.  PrintImage         - IMAGE_POSITIVE, IMAGE_NEGATIVE.
  215.  PrintAspect        - ASPECT_HORIZ, ASPECT_VERT.
  216.  PrintShade         - SHADE_BW, SHADE_GREYSCALE, SHADE_COLOR.
  217.  PrintThreshold     - 1 to 15.
  218.  PrintFlags         - CORRECT_RED, CORRECT_GREEN, CORRECT_BLUE, CENTER_IMAGE,
  219.                       IGNORE_DIMENSIONS, BOUNDED_DIMENSIONS,
  220.                       ABSOLUTE_DIMENSIONS, PIXEL_DIMENSIONS,
  221.                       MULTIPLY_DIMENSIONS, INTEGER_SCALING,
  222.                       ORDERED_DITHERING, HALFTONE_DITHERING.
  223.                       FLOYD_DITHERING, ANTI_ALIAS, GREY_SCALE2
  224.  PrintMaxWidth      - 0 to 65535.
  225.  PrintMaxHeight     - 0 to 65535.
  226.  PrintDensity       - 1 to 7.
  227.  PrintXOffset       - 0 to 255.
  228.  
  229.  Asynchronous I/O
  230.  ----------------
  231.  
  232.      The recommended way to do asynchronous i/o is...
  233.  
  234.  a) To send requests for i/o.
  235.  
  236.      struct IORequest *ioreq;
  237.      struct MsgPort *port;
  238.      UBYTE signal;
  239.  
  240.      port = ioreq->io_Message.mn_ReplyPort;
  241.      signal = port->mp_SigBit;
  242.  
  243.      SendIO(ioreq);  send request 
  244.      Wait(signal);  wait for completion (go to sleep) 
  245.      while ((Msg = GetMsg(port)) != NULL) {  get ALL messages
  246.      }
  247.  
  248.  b) To abort a previous request for i/o.
  249.  
  250.      struct IORequest *ioreq;
  251.  
  252.      AbortIO(ioreq);  abort request 
  253.      WaitIO(ioreq);  wait for reply 
  254.  
  255.      at this point you can re-use 'ioreq'.
  256.  
  257.      Note that in the above examples 'ioreq' could be any one of...
  258.      a) struct IOStdReq    a standard i/o request
  259.      b) struct IODRPReq    a dumprport i/o request
  260.      c) struct IOPrtCmdReq a printer command i/o request
  261.  
  262.      It is recommend that you do asynchronous i/o in your programs
  263.      and give the user a way of aborting all requests.
  264.  
  265.  
  266.          V1.3 Printer Driver Notes
  267.          -------------------------
  268.  
  269.      In general densities which use more than one pass should only be
  270.  used for B&W shade dumps.  They can be used for Grey-Scale or Color Shade
  271.  dumps BUT the output may tend to look muddy or dark.  Also multiple pass
  272.  Color dumps tend to dirty or smear the ribbon (ie. yellow will get
  273.  contaminated with the other colors on the ribbon; you've been warned).
  274.  
  275.  
  276.  Alphacom_AlphaPro_101
  277.  ---------------------
  278.  1. Daisywheel printer (text only).
  279.  
  280.  Brother_HR-15XL
  281.  ---------------
  282.  1. Daisywheel printer (text only).
  283.  
  284.  CalComp_ColorMaster
  285.  -------------------
  286.  1. Thermal transfer b&w/color printer (text and graphics).
  287.  2. Use Black ribbon for non-color dumps; Color ribbon for color dumps.
  288.  3. Linefeeds # of vertical dots printed.
  289.  4. Densitie(s) supported are 203x200(1) dpi.
  290.  5. This is a dual printer driver.  Select a PaperSize of 'Narrow Tractor'
  291.     for use with the ColorMaster; 'Wide Tractor' for use with the
  292.     ColorView-5912 (which uses 11 x 17 inch paper).
  293.  
  294.  CalComp_ColorMaster2
  295.  -------------------
  296.  1. Thermal transfer b&w/color printer (text and graphics).
  297.  2. Use Black ribbon for non-color dumps; Color ribbon for color dumps.
  298.  3. Linefeeds # of vertical dots printed.
  299.  4. Densitie(s) supported are 203x200(1) dpi.
  300.  5. This is a dual printer driver.  Select a PaperSize of 'Narrow Tractor'
  301.     for use with the ColorMaster; 'Wide Tractor' for use with the
  302.     ColorView-5912 (which uses 11 x 17 inch paper).
  303.  6. This driver is the same as the Calcomp_ColorMaster driver EXCEPT it is
  304.     approximately 2 times faster (during color dumps) and requires LOTS of
  305.     memory (up to 1,272,003 bytes for a full 8 x 10 inch (1600 x 2000 dot)
  306.     color dump).  Typically full-size (color) dumps are 1600 x 1149 dots and
  307.     require 730,767 bytes.  Memory requirements for the ColorView-5912
  308.     are up to 2,572,803 bytes for a full 10 x 16 inch (2048 x 3200 dot)
  309.     color dump.  Typically full-size (color) dumps are 2048 x 2155 dots and
  310.     require 1,732,623 bytes.  The memory requirements are 1/3 when doing a
  311.     non-color printout (on both the ColorMaster and ColorView).
  312.  
  313.  Canon_PJ-1080A
  314.  --------------
  315.  1. Ink jet b&w/color printer (text and graphics).
  316.  2. Linefeeds # of vertical dots printed.
  317.  3. Densitie(s) supported are 83x84(1) dpi.
  318.  
  319.  CBM_MPS1000
  320.  -----------
  321.  1. Dot matrix b&w printer (text and graphics).
  322.  2. Linefeeds # of vertical dots printed (-1/3 dot if PaperType = Single). *2
  323.  3. Density    XDPI    YDPI    XYDPI    Comments
  324.      1    120     72     8640
  325.      2    120    144    17280    two pass
  326.      3    240     72    17280            *1
  327.      4    120    216    25920    three pass
  328.      5    240    144    34560    two pass    *1
  329.      6    240    216    51840    three pass    *1
  330.      7    same as 6
  331.  
  332.  Diablo_630
  333.  ----------
  334.  1. Daisywheel printer (text only).
  335.  
  336.  Diablo_Advantage_D25
  337.  --------------------
  338.  1. Daisywheel printer (text only).
  339.  
  340.  Diablo_C-150
  341.  ------------
  342.  1. Ink jet b&w/color printer (text and graphics).
  343.  2. Always linefeeds 4 dots (limitation of printer).
  344.  3. A PaperSize of 'Wide Tractor' selects a maximum print width of
  345.     8.5 inches (for wide roll paper).
  346.  5. Densitie(s) supported are 120x120(1) dpi.
  347.  
  348.  EpsonQ (24-pin Epson compatible)
  349.  ------
  350.  1. Dot matrix b&w/color printer (text and graphics).
  351.  2. Drives all EpsonQ (LQ1500, LQ2500, etc.) compatible printers.
  352.  3. Linefeeds # of vertical dots printed.
  353.  4. Density    XDPI    YDPI    XYDPI    Comments
  354.      1     90    180    16200
  355.      2    120    180    21600
  356.      3    180    180    32400
  357.      4    360    180    64800    *1
  358.      5,6,7    same as 4
  359.  5. A PaperSize of 'Wide Tractor' selects a maximum print width of
  360.     13.6 inches (for wide carriage printers).
  361.  6. A PaperType of 'Single' uses only 16 of the 24 pins, whereas a PaperType
  362.     of 'Fanfold' uses all 24 pins.  The 'Single' option is useful for those
  363.     printers which have a weak power supply and cannot drive all 24 pins
  364.     continuously.  If during a single pass of the print head you notice that
  365.     the top two thirds of the graphics are darker than the bottom one third
  366.     then you'll probably need to drop down to 16 pins.
  367.  
  368.  EpsonX[CBM_MPS-1250] (8/9-pin Epson compatible)
  369.  --------------------
  370.  1. Dot matrix b&w/color printer (text and graphics).
  371.  2. Drives all EpsonX (EX/FX/JX/LX/MX/RX, etc.) compatible printers.
  372.  3. Linefeeds # of vertical dots printed (-1/3 dot if PaperType = Single). *2
  373.  4. Density    XDPI    YDPI    XYDPI    Comments
  374.      1    120     72     8640
  375.      2    120    144    17280    two pass
  376.      3    240     72    17280            *1
  377.      4    120    216    25920    three pass
  378.      5    240    144    34560    two pass    *1
  379.      6    240    216    51840    three pass    *1
  380.      7    same as 6
  381.  
  382.  5. A PaperSize of 'Wide Tractor' selects a maximum print width of
  383.     13.6 inches (for wide carriage printers).
  384.  6. Use this driver if you own a CBM_MPS-1250 (as it is EpsonX compatible).
  385.  
  386.  EpsonXOld (8/9-pin Epson compatible)
  387.  ---------
  388.  1. Dot matrix b&w printer (text and graphics).
  389.  2. Drives all very old EpsonX (EX/FX/JX/LX/MX/RX, etc.) compatible printers.
  390.  3. Linefeeds # of vertical dots printed.
  391.  4. Density    XDPI    YDPI    XYDPI    Comments
  392.      1     60    72     4320
  393.      2    120    72     8640    (double speed)            *1
  394.      3    120    72     8640
  395.      4    240    72    17280                    *1
  396.      5    120    72     8640    (for use on old Star printers)
  397.      6    240    72    17280    (for use on old Star printers)    *1
  398.      7    240    72    17280    (same as density 4)        *1
  399.  5. A PaperSize of 'Wide Tractor' selects a maximum print width of
  400.     13.6 inches (for wide carriage printers).
  401.  6. Use this driver if the EpsonX driver doesn't work properly in graphics
  402.     or text mode on your EpsonX compatible printer.
  403.  
  404.  generic
  405.  -------
  406.  1. Text only printer.
  407.  
  408.  Howtek_Pixelmaster
  409.  ------------------
  410.  1. Plastic ink jet b&w/color printer (text and graphics).
  411.  2. Linefeeds # of vertical dots printed.
  412.  3. Density    XDPI    YDPI    XYDPI    Comments
  413.      1     80     80     6400
  414.      2    120    120    14400
  415.      3    160    160    25600
  416.      4    240    240    57600
  417.      5,6,7    same as 4
  418.  4. Maximum print area is 8.0 x 10.0 inches.
  419.  
  420.  HP_DeskJet
  421.  ----------
  422.  1. Ink jet non-color printer (text and graphics).
  423.  2. Linefeeds # of vertical dots printed.
  424.  3. Density    XDPI    YDPI    XYDPI    Comments
  425.      1     75     75     5625
  426.      2    100    100    10000
  427.      3    150    150    22500
  428.      4    300    300    90000
  429.      5,6,7    same as 4
  430.  4. Maximum print area is 8.0 x 10.0 inches.
  431.  
  432.  HP_LaserJet (LaserJet+/LaserJetII compatible)
  433.  -----------
  434.  1. Laser engine non-color printer (text and graphics).
  435.  2. Linefeeds # of vertical dots printed.
  436.  3. Density    XDPI    YDPI    XYDPI    Comments
  437.      1     75     75     5625
  438.      2    100    100    10000
  439.      3    150    150    22500
  440.      4    300    300    90000
  441.      5,6,7    same as 4
  442.  4. Maximum print area is 8.0 x 10.0 inches.
  443.  
  444.  HP_PaintJet
  445.  -----------
  446.  1. Ink jet b&w/color printer (text and graphics).
  447.  2. Linefeeds # of vertical dots printed.
  448.  3. Densitie(s) supported are 180x180(1) dpi.
  449.  
  450.  HP_ThinkJet
  451.  ----------
  452.  1. Ink jet non-color printer (text and graphics).
  453.  2. Linefeeds # of vertical dots printed.
  454.  3. Density    XDPI    YDPI    XYDPI    Comments
  455.      1     96    96     9216
  456.      2    192    96    18432
  457.      3,4,5,6,7    same as 4
  458.  
  459.  Imagewriter II (Imagewriter compatible)
  460.  --------------
  461.  1. Dot matrix b&w/color printer (text and graphics).
  462.  2. Linefeeds # of vertical dots printed.
  463.  3. Density    XDPI    YDPI    XYDPI    Comments
  464.      1     80     72     5760
  465.      2    120     72     8640
  466.      3    144     72    10368
  467.      4    160     72    11520
  468.      5    120    144    17280    two pass
  469.      6    144    144    20736    two pass
  470.      7    160    144    23040    two pass
  471.  
  472.  Nec_Pinwriter (24-wire Pinwriter compatible (P5/P6/P7/P9/P2200))
  473.  -------------
  474.  1. Dot matrix b&w/color printer (text and graphics).
  475.  2. Drives all Nec 24-wire Pinwriter compatible printers.
  476.  3. Linefeeds # of vertical dots printed.
  477.  4. Density    XDPI    YDPI    XYDPI    Comments
  478.      1     90    180     16200
  479.      2    120    180     21600
  480.      3    180    180     32400
  481.      4    120    360     43200    two pass
  482.      5    180    360     64800    two pass
  483.      6    360    180     64800
  484.      7    360    360    129600    two pass
  485.  5. A PaperSize of 'Wide Tractor' selects a maximum print width of
  486.     13.6 inches (for wide carriage printers).
  487.  
  488.  Okidata_92
  489.  ----------
  490.  1. Dot matrix non-color printer (text and graphics).
  491.  2. Always linefeeds 7/72 inch (limitation of printer in graphics mode).
  492.  3. Densitie(s) supported are 72x72 dpi.
  493.  
  494.  Okidata_293I
  495.  ------------
  496.  1. Dot matrix b&w/color printer (text and graphics).
  497.  2. Drives 292 or 293 using the IBM interface module.
  498.  3. Linefeeds # of vertical dots printed (-1/2 dot if PaperType = Single) *3
  499.  4. Density    XDPI    YDPI    XYDPI    Comments
  500.      1    120    144    17280
  501.      2    240    144    34560
  502.      3    120    288    34560    two pass
  503.      4    240    288    69120    two pass
  504.      5,6,7    same as 4
  505.  5. A PaperSize of 'Wide Tractor' selects a maximum print width of
  506.     13.6 inches (for wide carriage printers).
  507.  
  508.  Okimate-20
  509.  ----------
  510.  1. Thermal transfer b&w/color printer (text and graphics).
  511.  2. Use Black ribbon for non-color dumps; Color ribbon for color dumps.
  512.  3. Linefeeds an even # of dots printed. (ie. if 3 printed, 4 advanced).
  513.  4. Densitie(s) supported are 120x144(1) dpi.
  514.  
  515.  Quadram_QuadJet
  516.  ---------------
  517.  1. Ink jet b&w/color printer (text and graphics).
  518.  2. Linefeeds # of vertical dots printed.
  519.  3. Densitie(s) supported are 83x84(1) dpi.
  520.  
  521.  Qume_LetterPro_20
  522.  -----------------
  523.  1. Daisywheel printer (text only).
  524.  
  525.  Seiko_5300
  526.  ----------
  527.  1. Thermal transfer b&w/color printer (graphics only).
  528.  2. Use Black ribbon for non-color dumps; Color ribbon for color dumps.
  529.  3. Density    XDPI    YDPI    XYDPI    Comments
  530.      1    152    152    23104    drives CH-5301 printer
  531.      2    203    203    41209    drives CH-5312 printer
  532.      3    240    240    57600    drives CH-5303 printer
  533.      4, 5,6,7    same as 3
  534.      You must select the proper density to drive the specific printer
  535.      that you have.
  536.  4. This driver is not on the Workbench or Extras disk.  It is available
  537.     on BIX and directly from Seiko.
  538.  
  539.  Seiko_5300a
  540.  -----------
  541.  1. Thermal transfer b&w/color printer (graphics only).
  542.  2. Use Black ribbon for non-color dumps; Color ribbon for color dumps.
  543.  3. Density    XDPI    YDPI    XYDPI    Comments
  544.      1    152    152    23104    drives CH-5301 printer
  545.      2    203    203    41209    drives CH-5312 printer
  546.      3    240    240    57600    drives CH-5303 printer
  547.      4, 5,6,7    same as 3
  548.      You must select the proper density to drive the specific printer
  549.      that you have.
  550.  4. This driver is the same as the Seiko_5300 driver EXCEPT it is
  551.     approximately 2 times faster (during color dumps) and requires LOTS of
  552.     memory (up to 1,564,569 bytes for a full 8 x 10 inch (1927 x 2173 dot)
  553.     color dump).  Typically full-size (color) dumps are 1927 x 1248 dots
  554.     and require 898,569 bytes.  The memory requirements are 1/3 when doing
  555.     a non-color printout.
  556.  5. This driver is not on the Workbench or Extras disk.  It is available
  557.     on BIX and directly from Seiko.
  558.  
  559.  Tektronix_4693D
  560.  ----------------
  561.  1. Thermal transfer b&w/color printer (graphics only).
  562.  2. Densitie(s) supported are 300x300(1) dpi
  563.  3. Due to the way the printer images a picture none of the printer
  564.     preferences options affect the printout with the following exceptions:
  565.      a)Aspect - Horizontal, Vertical
  566.      b)Shade - B&W, Grey_Scale, Color
  567.     ...as a result of this only full size pictures can be printed.
  568.  4. This driver is not on the Workbench or Extras disk.  It is available
  569.     on BIX and directly from Tektronix.
  570.  
  571.  Tektronix_4696
  572.  --------------
  573.  1. Ink jet b&w/color printer (text and graphics).
  574.  2. Always linefeeds 4 dots (limitation of printer).
  575.  3. Densities supported are 121x120(1), 242x120(black)(2) and
  576.     242x120(color)(3).
  577.     Selecting a density of 2 or higher really doesn't give you true 242 dpi
  578.     resolution since the printer only has 121 x dots per inch.
  579.     Instead this mode tells the printer to go into it's double pass mode.
  580.     Here, it outputs a line of dots at 121 dpi; and outputs the line again
  581.     (shifted to the right by 1/242 of an inch).  This produces much more
  582.     vibrate colors and gives the illusion of more resolution.  One drawback
  583.     is that large areas of solid colors (red, green, and blue specifically)
  584.     tend to over-saturate the paper with ink.  Density1 outputs all colors
  585.     in one pass.  Density 2 does a double pass on black.  Density 3 does a
  586.     double pass on all colors.  Density 1 to 3 correspond to the printer's
  587.     graphics printing modes 1 to 3 (respectively).
  588.  4. This driver is not on the Workbench or Extras disk.  It is available
  589.     on BIX and directly from Tektronix.
  590.  5. A PaperSize of 'Wide Tractor' selects a maximum print width of
  591.     9.0 inches (for wide roll paper).
  592.  
  593.  Toshiba_P351C (24-pin Toshiba compatible)
  594.  -------------
  595.  1. Dot matrix b&w/color printer (text and graphics).
  596.  2. Drives all Toshiba_P351C compatible printers.
  597.  3. Linefeeds # of vertical dots printed.
  598.  4. Density    XDPI    YDPI    XYDPI    Comments
  599.      1    180    180    32400
  600.      2    360    180    64800
  601.      3,4,5,6,7    same as 2
  602.  5. A PaperSize of 'Wide Tractor' selects a maximum print width of
  603.     13.5 inches (for wide carriage printers).
  604.  
  605.  Toshiba_P351SX (24-pin Toshiba compatible)
  606.  --------------
  607.  1. Dot matrix b&w/color printer (text and graphics).
  608.  2. Drives all Toshiba_P351SX (321SL, 321SLC, 341SL) compatible printers.
  609.  3. Linefeeds # of vertical dots printed.
  610.  4. Density    XDPI    YDPI    XYDPI    Comments
  611.      1    180    180     32400
  612.      2    360    180     64800
  613.      3    180    360     64800    two pass
  614.      4    360    360    129600    two pass
  615.      5,6,7    same as 4
  616.  5. A PaperSize of 'Wide Tractor' selects a maximum print width of
  617.     13.5 inches (for wide carriage printers).
  618.  
  619.  Xerox_4020
  620.  ----------
  621.  1. Ink jet b&w/color printer (text and graphics).
  622.  2. Always linefeeds 4 dots (limitation of printer).
  623.  3. This driver is IDENTICAL to the Diablo_C-150 driver EXCEPT it outputs
  624.     all black dots TWICE.  This is a special feature of this printer and
  625.     produces much more solid, darker black shades.  Please note that some
  626.     printing time overhead results from this feature; if you don't want it
  627.     use the Diablo_C-150 driver.
  628.  4. Densities supported are 121x120(1) and 242x240(2) dpi.
  629.     Selecting a density of 2 or higher really doesn't give you true 240 dpi
  630.     resolution since the Xerox_4020 only has 121 x dots per inch.
  631.     Instead this mode tells the printer to go into it's pseudo 240 dpi mode.
  632.     Here, it outputs a line of dots at 121 dpi; moves the paper up 1/240 of
  633.     an inch and outputs the line again (shifted to the right by 1/240 of an
  634.     inch).  This produces much more vibrate colors and gives the illusion
  635.     of more resolution.  One drawback is that large areas of solid colors
  636.     (red, green, and blue specifically) tend to over-saturate the paper with
  637.     ink.
  638.  5. A PaperSize of 'Wide Tractor' selects a maximum print width of
  639.     9.0 inches (for wide roll paper).
  640.  
  641.  
  642.  Notes
  643.  -----
  644.  
  645.  *0 - on most printers friction fed paper tends to produce better looking
  646.       (ie. less horizontal banding) graphic dumps than tractor fed paper.
  647.  
  648.  *1 - in this mode the printer cannot print two consecutive dots in a row.
  649.       It is recommended that you only use this density for B&W Shade dumps.
  650.  
  651.  *2 - only when 72 YDPI is selected.  This option is useful if you notice
  652.       tiny white horizontal strips in your printout.
  653.  
  654.  *3 - only when 144 YDPI is selected.  This option is useful if you notice
  655.       tiny white horizontal strips in your printout.
  656.  
  657.  
  658. printer.device/Flush                                   printer.device/Flush
  659.  
  660.    NAME
  661.     Flush - abort all I/O requests (immediate)
  662.  
  663.    FUNCTION
  664.     Flush aborts all stopped I/O at the unit.
  665.  
  666.    IO REQUEST
  667.     io_Message    mn_ReplyPort set if quick I/O is not possible
  668.     io_Device    preset by the call to OpenDevice
  669.     io_Command    CMD_FLUSH
  670.     io_Flags    IOB_QUICK set if quick I/O is possible
  671.  
  672.  
  673. printer.device/Invalid                               printer.device/Invalid
  674.  
  675.    NAME
  676.     Invalid - invalid command
  677.  
  678.    FUNCTION
  679.     Invalid is always an invalid command, and sets the device
  680.     error appropriately.
  681.  
  682.    IO REQUEST
  683.     io_Message    mn_ReplyPort set if quick I/O is not possible
  684.     io_Command    CMD_INVALID
  685.     io_Flags    IOB_QUICK set if quick I/O is possible
  686.  
  687.  
  688. printer.device/PrtCommand                         printer.device/PrtCommand
  689.  
  690.    NAME
  691.        PCPrtCommand -- send a command to the printer
  692.  
  693.    FUNCTION 
  694.       This function sends a command to either the parallel or serial
  695.       device.  The printer device maps this command to the control
  696.       code set of the current printer.  The commands supported can
  697.       be found with the printer.device/Write command.  All printers
  698.       may not support all functions.
  699.  
  700.    IO REQUEST IOPrtCmdReq
  701.        io_Message      mn_ReplyPort set
  702.        io_Device       preset by OpenDevice
  703.        io_Unit         preset by OpenDevice
  704.        io_Command      PRD_PRTCOMMAND
  705.        io_PrtCommand   the actual command number
  706.        io_Parm0        parameter for the command
  707.        io_Parm1        parameter for the command
  708.        io_Parm2        parameter for the command
  709.        io_Parm3        parameter for the command
  710.  
  711.    RESULTS
  712.        Errors: if the PCPrtCommand succeeded, then io_Error will be zero.
  713.        Otherwise io_Error will be non-zero.  An error of -1 indicates that
  714.        the command is not supported by the current printer driver.  This
  715.        could be used to check if the connected printer supports a particular
  716.        command (italics for example).
  717.  
  718.    SEE ALSO
  719.        printer.device/Write printer.h, parallel.device, Preferences
  720.  
  721.  
  722. printer.device/PWrite                                 printer.device/PWrite
  723.  
  724.    NAME
  725.     PWrite - internal write to printer port
  726.  
  727.    SYNOPSIS
  728.     error = (*PrinterData->pd_PWrite)(buffer, length);
  729.     D0                                  A0      D0
  730.  
  731.    FUNCTION
  732.     PWrite writes bytes to the printer.
  733.  
  734.  
  735. printer.device/Query                                   printer.device/Query
  736.  
  737.    NAME
  738.     Query - query printer port/line status
  739.  
  740.    FUNCTION
  741.     This command returns the status of the printer port's lines and registers.
  742.     Since the printer port uses either the serial or parallel port for i/o,
  743.     the actual status returned is either the serial or parallel port's status.
  744.  
  745.    IO REQUEST
  746.     io_Message    mn_ReplyPort set if quick I/O is not possible
  747.     io_Device    preset by the call to OpenDevice
  748.     io_Command    PRD_QUERY
  749.     io_Data        ptr to 2 UBYTES where result will be stored.
  750.  
  751.    RESULTS
  752.      io_Data          BIT  ACTIVE  FUNCTION (SERIAL DEVICE)
  753.  
  754.              LSB       0    low    reserved
  755.                        1    low    reserved
  756.                        2    low    reserved
  757.                        3    low    Data Set Ready
  758.                        4    low    Clear To Send
  759.                        5    low    Carrier Detect
  760.                        6    low    Ready To Send
  761.                        7    low    Data Terminal Ready
  762.              MSB       8    high   read buffer overflow
  763.                        9    high   break sent (most recent output)
  764.                       10    high   break received (as latest input)
  765.                       11    high   transmit x-OFFed       
  766.                       12    high   receive x-OFFed       
  767.                    13-15           reserved
  768.  
  769.  
  770.      io_Data          BIT  ACTIVE  FUNCTION (PARALLEL DEVICE)
  771.  
  772.                        0     hi     printer busy (offline)
  773.                        1     hi     paper out
  774.                        2     hi     printer selected
  775.                      (WARNING: the bit 2 line is also connected
  776.                       to the serial port's ring indicator pin
  777.                       on the A500 and A2000)
  778.                      3-7            reserved
  779.  
  780.      io_Actual       1-parallel, 2-serial
  781.  
  782.  
  783. printer.device/RawWrite                             printer.device/RawWrite
  784.  
  785.    NAME
  786.     RawWrite - transparent write command
  787.  
  788.    FUNCTION
  789.     This is a non standard write command that performs no
  790.     processing on the data passed to it.
  791.  
  792.    IO REQUEST
  793.     io_Message    mn_ReplyPort set if quick I/O is not possible
  794.     io_Command    PRD_RAWWRITE
  795.     io_Flags    IOB_QUICK set if quick I/O is possible
  796.     io_Length    the number of bytes in io_Data
  797.     io_Data        the raw bytes to write to the printer
  798.  
  799.  
  800. printer.device/Reset                                   printer.device/Reset
  801.  
  802.    NAME
  803.     Reset - reset the printer
  804.  
  805.    FUNCTION
  806.     Reset resets the printer device without destroying handles
  807.     to the open device.
  808.  
  809.    IO REQUEST
  810.     io_Message    mn_ReplyPort set if quick I/O is not possible
  811.     io_Device    preset by the call to OpenDevice
  812.     io_Command    CMD_RESET
  813.     io_Flags    IOB_QUICK set if quick I/O is possible
  814.  
  815.  
  816. printer.device/Start                                   printer.device/Start
  817.  
  818.    NAME
  819.     Start - restart after stop (immediate)
  820.  
  821.    FUNCTION
  822.     Start restarts the unit after a stop command.
  823.  
  824.    IO REQUEST
  825.     io_Message    mn_ReplyPort set if quick I/O is not possible
  826.     io_Device    preset by the call to OpenDevice
  827.     io_Command    CMD_START
  828.     io_Flags    IOB_QUICK set if quick I/O is possible
  829.  
  830.  
  831. printer.device/Stop                                     printer.device/Stop
  832.  
  833.    NAME
  834.     Stop - pause current and queued I/O requests (immediate)
  835.  
  836.    FUNCTION
  837.     Stop pauses all queued requests for the unit, and tries to
  838.     pause the current I/O request.  The only commands that will
  839.     be subsequently allowed to be performed are immediate I/O
  840.     requests, which include those to start, flush, and finish the
  841.     I/O after the stop command.
  842.  
  843.    IO REQUEST
  844.     io_Message    mn_ReplyPort set if quick I/O is not possible
  845.     io_Device    preset by the call to OpenDevice
  846.     io_Command    CMD_STOP
  847.     io_Flags    IOB_QUICK set if quick I/O is possible
  848.  
  849.  
  850. printer.device/Write                                   printer.device/Write
  851.  
  852.    NAME
  853.       PCWrite -- send output to the printer
  854.  
  855.    FUNCTION
  856.       This function causes a buffer of characters to be written to the
  857.       current printer port (usually parallel or serial).  The number of
  858.       characters is specified in io_Length, unless -1 is used, in which
  859.       case output is sent until a 0x00 is encountered.
  860.  
  861.       The Printer device, like the Console device, maps ANSI X3.64 style
  862.       7-bit printer control codes to the control code set of the current
  863.       printer.  The ANSI codes supported can be found below.
  864.  
  865.    NOTES
  866.       Not all printers will support all functions.  In particular you may
  867.       not assume that the MARGINS or TABS can be set.  Close to half the
  868.       supported printers don't fully implement one or the other.  If you
  869.       want the features of margins or tabs you will need to fake it
  870.       internally by sending out spaces. 
  871.  
  872.       Note that the printer device may have already sent out a "set
  873.       margins" command to the printer.  If you are faking your own
  874.       margins, be sure to cancel the old ones first.  (use the "aCAM"
  875.       command)
  876.  
  877.       Defaults are set up so that if a normal AmigaDOS text file
  878.       is sent to PRT:, it has the greatest chance of working. 
  879.       (AmigaDOS text files are defined as follows:)
  880.               tabs            - every 8
  881.               CR (0x0D)       - moves to start of current line
  882.               LF (0x0A)       - moves to start of next line
  883.  
  884.    IO REQUEST
  885.        io_Message      mn_ReplyPort set
  886.        io_Device       preset by OpenDevice
  887.        io_Unit         preset by OpenDevice
  888.        io_Command      CMD_WRITE
  889.        io_Length       number of characters to process, or if -1,
  890.                        process until 0x00 encountered
  891.        io_Data         pointer to block of data to process
  892.  
  893.    RESULTS
  894.        io_Error : if PCWrite succeeded, then io_Error will be zero.
  895.               Otherwise io_Error will be non-zero.
  896.  
  897.    SEE ALSO
  898.        printer.h, parallel.device, serial.device, Preferences
  899.  
  900.  
  901.    ANSI X3.64 style COMMANDS
  902.  
  903.  aRIS         ESCc            hard reset
  904.  aRIN         ESC#1           initialize to defaults
  905.  aIND         ESCD            true linefeed (lf)
  906.  aNEL         ESCE            return,lf
  907.  aRI          ESCM            reverse lf              *
  908.  
  909.  aSGR0        ESC[0m          normal character set
  910.  aSGR3        ESC[3m          italics on
  911.  aSGR23       ESC[23m         italics off
  912.  aSGR4        ESC[4m          underline on
  913.  aSGR24       ESC[24m         underline off
  914.  aSGR1        ESC[1m          boldface on
  915.  aSGR22       ESC[22m         boldface off
  916.  aSFC         SGR30-39        set foreground color
  917.  aSBC         SGR40-49        set background color
  918.  
  919.  aSHORP0      ESC[0w          normal pitch
  920.  aSHORP2      ESC[2w          elite on
  921.  aSHORP1      ESC[1w          elite off
  922.  aSHORP4      ESC[4w          condensed on
  923.  aSHORP3      ESC[3w          condensed off
  924.  aSHORP6      ESC[6w          enlarged on
  925.  aSHORP5      ESC[5w          enlarged off
  926.  
  927.  aDEN6        ESC[6"z         shadow print on
  928.  aDEN5        ESC[5"z         shadow print off
  929.  aDEN4        ESC[4"z         doublestrike on
  930.  aDEN3        ESC[3"z         doublestrike off
  931.  aDEN2        ESC[2"z         Near Letter Quality (NLQ) on
  932.  aDEN1        ESC[1"z         NLQ off
  933.  
  934.  aSUS2        ESC[2v          superscript on
  935.  aSUS1        ESC[1v          superscript off
  936.  aSUS4        ESC[4v          subscript on
  937.  aSUS3        ESC[3v          subscript off
  938.  aSUS0        ESC[0v          normalize the line      *
  939.  aPLU         ESCL            partial line up         *
  940.  aPLD         ESCK            partial line down       *
  941.  
  942.  aFNT0        ESC(B           US char set (default)   or Font 0
  943.  aFNT1        ESC(R           French char set         or Font 1
  944.  aFNT2        ESC(K           German char set         or Font 2
  945.  aFNT3        ESC(A           UK char set             or Font 3
  946.  aFNT4        ESC(E           Danish I char set       or Font 4
  947.  aFNT5        ESC(H           Sweden char set         or Font 5
  948.  aFNT6        ESC(Y           Italian char set        or Font 6
  949.  aFNT7        ESC(Z           Spanish char set        or Font 7
  950.  aFNT8        ESC(J           Japanese char set       or Font 8
  951.  aFNT9        ESC(6           Norweign char set       or Font 9
  952.  aFNT10       ESC(C           Danish II char set      or Font 10
  953.  
  954.  aPROP2       ESC[2p          proportional on         *
  955.  aPROP1       ESC[1p          proportional off        *
  956.  aPROP0       ESC[0p          proportional clear      *
  957.  aTSS         ESC[n E         set proportional offset *
  958.  aJFY5        ESC[5 F         auto left justify       *
  959.  aJFY7        ESC[7 F         auto right justify      *
  960.  aJFY6        ESC[6 F         auto full justify       *
  961.  aJFY0        ESC[0 F         auto justify off        *
  962.  aJFY3        ESC[3 F         letter space (justify)  *
  963.  aJFY1        ESC[1 F         word fill(auto center)  *
  964.  
  965.  aVERP0       ESC[0z          1/8" line spacing
  966.  aVERP1       ESC[1z          1/6" line spacing
  967.  aSLPP        ESC[nt          set form length n
  968.  aPERF        ESC[nq          set perforation skip to n lines (n>0)
  969.  aPERF0       ESC[0q          perforation skip off
  970.  
  971.  aLMS         ESC#9           Left margin set         *
  972.  aRMS         ESC#0           Right margin set        *
  973.  aTMS         ESC#8           Top margin set          *
  974.  aBMS         ESC#2           Bottom margin set       *
  975.  aSTBM        ESC[Pn1;Pn2r    set T&B margins         *
  976.  aSLRM        ESC[Pn1;Pn2s    set L&R margin          *
  977.  aCAM         ESC#3           Clear margins
  978.  
  979.  aHTS         ESCH            Set horiz tab           *
  980.  aVTS         ESCJ            Set vertical tabs       *
  981.  aTBC0        ESC[0g          Clr horiz tab           *
  982.  aTBC3        ESC[3g          Clear all h tab         *
  983.  aTBC1        ESC[1g          Clr vertical tabs       *
  984.  aTBC4        ESC[4g          Clr all v tabs          *
  985.  aTBCALL      ESC#4           Clr all h & v tabs      *
  986.  aTBSALL      ESC#5           Set default tabs (every 8)
  987.  
  988.  aEXTEND      ESC[Pn"x        Extended commands
  989.                               This is a mechanism for printer drivers to
  990.                               support extra commands which can be called
  991.                               by ANSI control sequences
  992.  aRAW         ESC[Pn"r        Next 'Pn' chars are raw (ie. they are not
  993.                               parsed by the printer device, instead they
  994.                               are sent directly to the printer.
  995.  
  996.  
  997.  (*) indicates that sending this command may cause unexpected results
  998.      on a large number of printers.
  999.  
  1000.  
  1001.  
  1002.